home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1794 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  45 lines

  1. Path: news.eunet.fi!fipnet!kone!jsaarinen
  2. Newsgroups: comp.sys.amiga.programmer
  3. X-NewsReader: IntuiNews 1.2b (31.7.94)
  4. References: <4d42gg$i2p@ra.ibr.cs.tu-bs.de> <4dov8s$rc5@ar.ar.com.au>
  5. From: "Jyrki Saarinen" <jsaarinen@kone.fipnet.fi>
  6. Date: Tue, 23 Jan 96 15:56:14 UT
  7. Comments: Illegal date header - new date added by quicknews
  8. X-Original-Date: Tue, 23 Jan 96 00:16:44 
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset=iso-8859-1
  11. Content-Transfer-Encoding: binary
  12. Distribution: world
  13. Subject: Re: PPC compilers
  14. Message-ID: <38232132@kone.fipnet.fi>
  15.  
  16.  
  17. > To do fast 16:16 bit fixed point maths (ie for bitmap scaling). You have
  18. > the fraction in the  high word and the integer part in the low word. 
  19. >áBecause of the addx, every time the fraction wraps around, the X bit is set 
  20. >áand next add, the integer bit is incremented.
  21.  
  22. Addx is really great .. Hmm. We could think of all the
  23. situations where addx could possibly go wrong. (I mean
  24. fixed point interpolations)
  25.  
  26. At least this has to be done before the loop:
  27.         moveq   #0,d0
  28.         add.l   d1,d0
  29.  
  30.         ...
  31. .loop   addx.l  d1,d2
  32.         dbf     d7,.loop
  33.  
  34. But what about if there is two addx? Theis decimal parts
  35. have to be switched, which is done nicely with eor
  36. before swapping, but what about that before loop
  37. correction? Of course this perfect accuracy
  38. is not required on 16.16 fixed point but if
  39. there is a smaller amount of fraction, the
  40. errors can be quite big..
  41.  
  42. --                               _
  43. a Stellar programmer          _ //
  44. "Amiga - back for the future" \X/
  45.